<template>
  <div class="about">
    <el-backtop target=".about" :bottom="100">
      <i class="el-icon-caret-top"></i>
    </el-backtop>
    <el-container class="outer">
      <el-row :gutter="10">
        <el-col :span="24">
          <h1 class="toptop">top</h1>
        </el-col>
      </el-row>
      <el-row :gutter="10">
        <el-col :span="24">
          <el-table
            id="mytable"
            max-height="350"
            :data="tableData"
            style="width: 100%"
            border
            row-class-name="my-tr-color"
          >
            <el-table-column
              header-align="center"
              align="center"
              prop="date"
              label="日期"
              width="300"
            >
            </el-table-column>
            <el-table-column
              header-align="center"
              align="center"
              prop="name"
              label="姓名"
            >
            </el-table-column>
            <el-table-column
              prop="addr"
              label="地址"
              align="center"
              header-align="center"
            >
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
      <el-divider content-position="left">周恩来</el-divider>
      <el-badge is-dot @click="alert('message')">信息</el-badge>
      <el-divider></el-divider>
      <el-badge is-dot>
        <el-button type="primary" icon="el-icon-share" @click="alert('1111')"></el-button>
      </el-badge>
      <el-row :gutter="10">
        <el-col :span="6">
          <el-card class="box-card">
            <div slot="header" class="header-box">
              <span>为中华之崛起而读书！</span>
              <el-button type="text">选项</el-button>
            </div>
            <div v-for="o in 4" :key="o" class="text item">
              {{'列表内容'+ o}}
            </div>
          </el-card>
        </el-col>
      </el-row>
    </el-container>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [
        { date: "2021-10-14", name: "杨国", addr: "南京市玄武区1" },
        { date: "2021-10-15", name: "杨国", addr: "南京市玄武区2" },
        { date: "2021-10-16", name: "杨国", addr: "南京市玄武区3" },
        { date: "2021-10-17", name: "杨国", addr: "南京市玄武区4" },
        { date: "2021-10-18", name: "杨国", addr: "南京市玄武区5" },
        { date: "2021-10-19", name: "杨国", addr: "南京市玄武区6" },
        { date: "2021-10-20", name: "杨国", addr: "南京市玄武区7" },
      ],
    };
  },
  methods: {
    alert(m){
      console.log(m)
    },
    onSubmit() {
      console.log(this.formInline);
    },
  },
};
</script>
// scoped  加不加 是有区别的,
// 不加, 就正常使用,
//加了scoped之后,  写的css样式 将不会渗透到 此vue文件里引用的子组件,
//想渗透  可以用 /deep/ 或 >>> 选择器  {}  
<style  scoped>
.about {
  width: 100%;
  /* height: 100%; */
  height: 100vh;
  overflow-x: hidden;
  /* background-color: red; */
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  /* line-height: 160px; */
}

.outer {
  display: block;
  margin-bottom: 40px;
  height: 70%;
}

/* 非scoped 写法 .my-tr-color { */
/* /deep/ #mytable .my-tr-color { */
>>> #mytable .my-tr-color {
  background: linear-gradient(
    to right,
    rgba(38, 255, 0, 0.623),
    rgba(255, 238, 0, 0.246)
  );
  /* background-color:  lime !important;  */
}

.about {
  background-color: #eee;
}

.text{
  font-size: 14px;
}
.item{
  margin-bottom: 18px;
}
.box-card{
  width: 480px;
}
.header-box{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

div.text.item{
  /* padding-left: 200px; */
  text-align: left;
}

</style>